package com.jc.oss.config;

import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author gongjiawei
 * @Date 2024/8/30 16:39
 * @注释
 */
@Configuration
public class MinioConfig {

    @Value("${minio.url}")
    private String url;


    @Value("${minio.accessKey}")
    private String accessKey;


    @Value("${minio.secretKey}")
    private String secretKey;

    @Bean
   public MinioClient getMinioClient(){
       return MinioClient.builder().endpoint(url).credentials(accessKey,secretKey).build();
   };


}
